#ifndef __HPET_TIMER_H__
#define __HPET_TIMER_H__

extern volatile const uint32_t *hpet_tick;
extern uint32_t                 hpet_tick_freq;

typedef void(*hpet_timer_cb_f)(void*);

int hpet_timer_init(void);

int  hpet_timer_open_ns(hpet_timer_cb_f cb, void *data, uint32_t ns);
int  hpet_timer_open_us(hpet_timer_cb_f cb, void *data, uint32_t us);
int  hpet_timer_open_ms(hpet_timer_cb_f cb, void *data, uint32_t ms);
void hpet_timer_close(int idx);
int  hpet_timer_test(int idx);
int  hpet_timer_free(int idx);

#endif
